/****************************************************************************
*                     U N R E G I S T E R E D   C O P Y
* 
* You are on day 18 of your 30 day trial period.
* 
* This file was produced by an UNREGISTERED COPY of Parser Generator. It is
* for evaluation purposes only. If you continue to use Parser Generator 30
* days after installation then you are required to purchase a license. For
* more information see the online help or go to the Bumble-Bee Software
* homepage at:
* 
* http://www.bumblebeesoftware.com
* 
* This notice must remain present in the file. It cannot be removed.
****************************************************************************/

/****************************************************************************
* ocfprecomp_y.h
* C++ header file generated from ocfprecomp_y.y.
* 
* Date: 02/08/10
* Time: 14:25:06
* 
* AYACC Version: 2.07
****************************************************************************/

#ifndef _OCFPRECOMP_Y_H
#define _OCFPRECOMP_Y_H

#include <yycpars.h>

#ifndef YYSTYPE
union tagYYSTYPE {
#line 9 ".\\ocfprecomp_y.y"

	DTYPE m_dtType;
	long m_lNumber;
	SYMBOL* m_pstSymbol;
	PARAM_TYPE* m_pstParamType;
	PARAM* m_pstParam;
	TAC* m_pstTac;
	INF* m_pstInterface;
	STR* m_pstDefines;
	char* m_pszCopyAndPaste;

#line 47 "ocfprecomp_y.h"
};

#define YYSTYPE union tagYYSTYPE
#endif

#define NAME 257
#define NUMBER 258
#define LPARENTHESIS 259
#define RPARENTHESIS 260
#define LBRACE 261
#define RBRACE 262
#define LBRACKET 263
#define RBRACKET 264
#define LOWQUOTE 265
#define SEMICOLON 266
#define UNSIGNED 267
#define INT 268
#define SHORT 269
#define LONG 270
#define CHAR 271
#define FLOAT 272
#define DOUBLE 273
#define INT64 274
#define INTERFACE 275
#define IN 276
#define OUT 277
#define POINTER 278
#define EMP 279
#define LENGTH_IS 280
#define MAX_IS 281
#define ID 282
#define DEFINE 283
#define COPYANDPASTE 284
#define COPYANDPASTE2 285
#line 67 ".\\ocfprecomp_y.y"

#include "ocfprecomp_l.h"

#line 86 "ocfprecomp_y.h"
/////////////////////////////////////////////////////////////////////////////
// COcfYacc

#ifndef YYEXPPARSER
#define YYEXPPARSER
#endif

class YYEXPPARSER YYFAR COcfYacc : public _YL yyfparser {
public:
	COcfYacc();
	virtual ~COcfYacc();

protected:
	void yytables();
	virtual void yyaction(int action);
#ifdef YYDEBUG
	void YYFAR* yyattribute1(int index) const;
	void yyinitdebug(void YYFAR** p, int count) const;
#endif

	// attribute functions
	virtual void yystacktoval(int index);
	virtual void yyvaltostack(int index);
	virtual void yylvaltoval();
	virtual void yyvaltolval();
	virtual void yylvaltostack(int index);

	virtual void YYFAR* yynewattribute(int count);
	virtual void yydeleteattribute(void YYFAR* attribute);
	virtual void yycopyattribute(void YYFAR* dest, const void YYFAR* src, int count);

public:
#line 74 ".\\ocfprecomp_y.y"

public:
	typedef std::map<long, TAC*> _FUNC_TBL_T;
	typedef std::map<std::string, TAC*> _PARAM_TYPE_TBL_T;
	typedef std::map<std::string, TAC*> _INTERFACE_TBL_T;
	typedef std::map<std::string, std::string> _DEFINE_TBL_T;

private:
	COcfLex m_lOcfLex;
	INF* m_pstInterface;
	INF* m_pstCurrInterface;
	_FUNC_TBL_T m_cFunctionMap;
	_PARAM_TYPE_TBL_T m_cParamTypeMap;
	_INTERFACE_TBL_T m_cInterfaceMap;
	_DEFINE_TBL_T m_cDefineMap;
	long m_lIdSeq;

public:
	INF* MkInterface(FCTYPE fcType, SYMBOL* pstSymbol, TAC* pstFunctionList, char* pszCopyAndPaste);
	TAC* MkFunction(long lId, FCTYPE fcType, SYMBOL* pstSymbol, PARAM* pstParamList);
	PARAM* MkParam(PARAM_TYPE* pstParamType, DTYPE dtType, long lDimemsions, SYMBOL* pstTypeSymbol, SYMBOL* pstSymbol, long lArrSize);
	PARAM_TYPE* MkParamType(PTYPE ptypeType, DIRECTION m_dirtType, SYMBOL* m_pstSymbol);
	STR* MkString(const char* pszString);
	void ChkDupFunctionName(TAC* pstFirst, TAC* pstCurrTac);
	void ChkDupParameterName(PARAM* pstFirst, PARAM* pstCurrParam);
	void ChkParameterType(PARAM* pstFirst, PARAM* pstCurrParam);
	void ChkHideParameter(PARAM* pstFirst, PARAM* pstCurrParam);
	void Error(char* pszErrorString);
	bool Create();

public:
	inline COcfLex& GetOcfLexInstance() { return m_lOcfLex; }
	inline INF* GetFirstInterface() { return m_pstInterface; }
	inline INF* GetCurrInterface() { return m_pstCurrInterface; }
	inline void GoNextInterface() { m_pstCurrInterface = m_pstCurrInterface->m_pstNext; }
	inline void GoFirstInterface() { m_pstCurrInterface = m_pstInterface; }
	inline _FUNC_TBL_T& GetFunctionMapInstance() { return m_cFunctionMap; }
	inline _PARAM_TYPE_TBL_T& GetParamTypeMapInstance() { return m_cParamTypeMap; }
	inline _DEFINE_TBL_T& GetDefineTblMapInstance() { return m_cDefineMap; }

private:
	DIRECTION FindDirectionInfo(PARAM_TYPE* pstFirst);
	PTYPE FindParameterType(PARAM_TYPE* pstFirst);
	SYMBOL* FindLengthSymbol(PARAM_TYPE* pstParamType);	
	void FindMax(PARAM_TYPE* pstParamType, char achDefineNames[MAX_NAME_LEN]);	

#line 166 "ocfprecomp_y.h"
};

#ifndef YYPARSERNAME
#define YYPARSERNAME COcfYacc
#endif

#endif
